//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<IFont.h>
///	@path	~/src/graphics/
///	@date	2007/11/09
///	@desc	DirectX font interface.

#pragma once

#include "xeres.h"

#include "lib/math/color.h"

#include "graphics/IDeviceResource.h"

namespace xeres {

	// forward declaration
	class ISprite;

	/*!
		\class	IFont
		\brief	DirectX font interface.
		
		\sa ISprite
	*/
	class IFont : public IDeviceResource
	{
	public:

		/// \name Constructor & Destructor
		//@{

		/// \ctor
		IFont( void );

		/// \dtor
		virtual ~IFont( void );

		//@}

		DECL_IOBJECT_INTERFACE( IFont , IDeviceResource );

	public:

		/// \name IFont Interface
		//@{

		/*!
			\brief		Get text rendering context.
		*/
		virtual void * GetDC( void ) = 0;

		/*!
			\brief		Draw text use fonts.
		*/
		virtual int DrawText( RefWeak<ISprite> sprite , const WString& text ,
			int rect[4] , int style , PackColor4 color ) = 0;

		//@}
	};

} // namespace xeres
